package xcmg.device.dao.mapper.company;

import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;
import xcmg.device.dao.entity.company.DealerVehicleDO;
import xcmg.device.service.vo.company.CompanyDealerVO;
import xcmg.device.service.vo.company.DealerVehicleExportVO;
import xcmg.device.service.vo.company.DealerVehicleVO;

import java.util.List;

@Mapper
@Repository
public interface DealerVehicleMapper {
    int deleteByPrimaryKey(String id);

    int insert(DealerVehicleDO record);

    int insertSelective(DealerVehicleDO record);

    DealerVehicleDO selectByPrimaryKey(String id);

    int updateByPrimaryKeySelective(DealerVehicleDO record);

    int updateClientNameByClientId(@Param("clientName") String clientName,@Param("clientId") String clientId);

    int update(DealerVehicleDO record);

    List<DealerVehicleDO> list(DealerVehicleVO dealerVehicleVO);

    List<DealerVehicleDO> notDeactivatedList(DealerVehicleVO dealerVehicleVO);

    Integer vehicleCount(DealerVehicleDO dealerVehicleDO);

    Integer existCount(@Param("id") String id);

    int disable(DealerVehicleDO dealerVehicleDO);

    List<DealerVehicleDO> getVehicleList(DealerVehicleVO dealerVehicleVO);

    List<DealerVehicleDO> selectByClientName(@Param("clientName") String clientName,@Param("orgId") String orgId );

    List<String> getVehicleNoList(@Param("clientName") String clientName,@Param("orgId") String orgId );

   DealerVehicleDO getPersonVehicleInfo(@Param("clientName") String clientName,@Param("orgId") String orgId,@Param("carNo") String carNo );

    DealerVehicleDO getAvailableVehicleInfo(@Param("clientName") String clientName,@Param("orgId") String orgId,@Param("carNo") String carNo );

    int deleteByClientId(@Param("clientId") String clientId);

    List<DealerVehicleExportVO> listDealerVehicle(CompanyDealerVO companyDealerVO);

    Integer countDealerVehicle(CompanyDealerVO companyDealerVO);

    DealerVehicleDO getByCarNo(@Param("carNo") String carNo, @Param("orgId") String orgId);

    Integer getWarrantStatus(@Param("carNo") String carNo, @Param("clientId") String clientId, @Param("orgId") String orgId);
}